#include <stdio.h>

/* Using type def an struct */
int main (void)
{

/*
-Stucture was declared thus a new type called telephone is created. 
-Before you can use the type telephone you have to create a variable of the type telephone.
*/
struct telephone
	{
		char *name;
		int number;
	};

/* NOTE: struct is needed before type telephone */
struct telephone  sample; /*  index is now a variable of the type telephone */

/* To access the members of the structure telephone, you must use a dot between the structure name and the variable name(variables:name or number. */
sample.name = "Test Name";
sample.number = 1234567;
printf("Print name: %s\n", sample.name);

/* Failure Alert */
// printf("Print number: %s\n", sample.number); /* <-- This caused a segmentation fault due to the %s) */
printf("Print number: %d\n", sample.number);


return 0;

}






